package com.github.phoenics.bazooka.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.phoenics.bazooka.dao.RoomDao;
import com.github.phoenics.bazooka.domain.po.Room;
import com.github.phoenics.bazooka.domain.po.Student;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Phoenics Chow
 * on 2019年02月10日
 */
@Service
public class RoomService extends ServiceImpl<RoomDao, Room>{
    private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RoomService.class);
    public List<Student> studentsInRoom(Room room){
        return this.baseMapper.findStudentsById(room.getId());

    }
    public IPage<Student> studentsInRoom(Page<Student> page,Room room){
        return this.baseMapper.findStudentsById(page,room.getId());

    }
}
